﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MegBack.aspx.cs" Inherits="ZX.WebApp.Message.MegBack" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table>
    <tr>
                <td>接收人：</td>
                <td ><input type="text" disabled="disabled" id="txtmphone" rows="3" style="width:380px;" runat="server" />
                <input type="hidden" id="Rid" runat="server" />
                </td>
            </tr>
    <tr>
                <td>消息：<span style="color: Red">*</span></td>
                <td >
                    <textarea id="txtMODEL" name="receave" rows="6"  runat="server"
                        style="width:380px;"></textarea>
                </td>
            </tr>
            <tr>
                <td width="100"></td>
                <td>
                    <%--<asp:DropDownList ID="ddlSendmode" runat="server"  Enabled="false" Width="160">
                        <asp:ListItem Value="0">短信</asp:ListItem>
                        <asp:ListItem Value="1">邮件</asp:ListItem>
                        <asp:ListItem Value="2">CRM系统</asp:ListItem>
                    </asp:DropDownList>--%>
               <%-- 定时：<input runat="server" type="text" id="PlanTime" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm'})"  style="width:100px;" />--%>
                    <asp:HiddenField ID="hdfuserid" runat="server" />
                </td>
            </tr>
            <tr>
            <td>提示：</td>
            <td>填写[消息]内容后，点击[保存]即时发送！</td>
            </tr>
         </table>
    </div>
    <script language="javascript" type="text/javascript" src="../Scripts/DatePicker/WdatePicker.js"></script>
    <script src="../Scripts/jquery-1.6.min.js" type="text/javascript"></script>
    
    <script language="javascript" type="text/javascript" >
        function Save()
        {
            var content = document.getElementById("txtMODEL").value;
            if (content == "" || content == null)
            {
                alert("消息内容不能为空！");
                document.getElementById("txtMODEL").focus();
                return;
            }
            var ids = queryString("id");
            var jis =decodeURI(queryString("ShouJi"));
            $.post('MQMessage.ashx', { TYPE: "MegReback", PARA: ids + "︾" + jis + "︾" + content + "︾" + document.getElementById("hdfuserid").value },
                function (data)
                {
                    RefreshData();
                    alert(data);
                });
        }


        //只取一个URL参数：
        var queryString = function (key)
        {
            return (document.location.search.match(new RegExp("(?:^\\?|&)" + key + "=(.*?)(?=&|$)")) || ['', null])[1];
        }
        function RefreshData()//刷新父页数据
        {
            if (parent.NeedRefreshPage != null)
            {
                if (typeof (parent.NeedRefreshPage.LoadData) == "function")
                {
                    parent.NeedRefreshPage.RefreshData();
                }
            }
        }
    </script>
    </form>
</body>
</html>
